﻿using DemoProject;
using MotionFramework.MVC;
using MotionFramework.Scene;
using MotionFramework.UIKit;
using YooAsset;

//启动逻辑
public class StartUpCommand : SimpleCommand
{
    public override void Execute(INotification notification)
    {
        // //Model
        GameFacade.Instance.RegisterProxy(new NewMoblieInterfaceModel());
        // Facade.RegisterModel(new ServerModel());
        // Facade.RegisterModel(new GlobalUserItem());
        // Facade.RegisterModel(new GameItemModel());
        // Facade.RegisterModel(new PrivateModel());
        // Facade.RegisterModel(new RoomModel());
        // Facade.RegisterModel(new ShareModel());
        // Facade.RegisterModel(new LocationModel());

        // //Controller
        //GameFacade.Instance.RegisterCommand<NewMoblieInterfaceCommand>(typeof(NewMoblieInterfaceCommand));
        // Facade.RegisterController(typeof(LoginServerCommand));
        // Facade.RegisterController(typeof(ClubServerCommand));
        // Facade.RegisterController(typeof(GameServerCommand));
        // Facade.RegisterController(typeof(DownloadCommand));

        // //Scene
        // GameSceneManager.Instance.RegistScene(new DownloadScene(AppSceneIndex.Download));
        // GameSceneManager.Instance.RegistScene(new PreloadScene(AppSceneIndex.Preload));
        // GameSceneManager.Instance.RegistScene(new LoginScene(AppSceneIndex.Login));
        // GameSceneManager.Instance.RegistScene(new LobbyScene(AppSceneIndex.Lobby));
        // GameSceneManager.Instance.RegistScene(new ClubScene(AppSceneIndex.Club));
        // GameSceneManager.Instance.RegistScene(new LandScene(AppSceneIndex.Land));
        // GameSceneManager.Instance.RegistScene(new MahjongScene(AppSceneIndex.Mahjong));
        // GameSceneManager.Instance.StartUp();

        // Facade.SendEvent(typeof(NewMoblieInterfaceCommand), ConstHttpCommands.GetGameListCommand);
        SceneManager.Instance.Register<LoginScene>();

        // Login
        SceneManager.Instance.LoadAsync<LoginScene>();
    }
}
